package com.blueocean_health.care.management.domain.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.alibaba.fastjson.annotation.JSONField;
import com.blueocean_health.care.management.common.base.string.StringUtils;
import com.blueocean_health.care.management.common.excel.ExcelResources;
import com.blueocean_health.care.management.em.LashStatusEnum;
import com.blueocean_health.care.management.em.OrderTypeEnum;
import com.blueocean_health.care.management.em.PayTypeEnum;

import lombok.Data;

/**
 * 对账单明细导出实体
 * 
 * @todo
 * @author 张亚林
 * @date 2018年8月20日 上午11:43:15
 */
// @Data
public class PayInfoReportDto {
	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
	private Integer id;// 序号

	private String reqLogNo;// 流水号
	private String payChlTyp;// 支付渠道类型 默认：WECHAT(微信) ALIPAY(支付宝)
	private String txnAmt;// 支付金额
	private String tradeType;// 交易接口类型 默认：NATIVE(扫码支付) JSAPI(H5支付) APP
	private String orderType;// 订单类型 1 新入付费、2 续费、3 退款
	private String orderId;// 订单号
	private Date txnTm;// 交易时间
	private String receiptNumber;// 关联收据编号
	private String dealUser;// 签单人
	private Date subTm;// 提交时间
	private String isLash;// 扎帐状态

	private String isLashName;

	@ExcelResources(title = "序号", order = 1)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ExcelResources(title = "流水号", order = 2)
	public String getReqLogNo() {
		return reqLogNo;
	}

	public void setReqLogNo(String reqLogNo) {
		this.reqLogNo = reqLogNo;
	}

	@ExcelResources(title = "交易时间", order = 3)
	public String getTxnTm() {
		if (StringUtils.isEmpty(txnTm)) {
			return null;
		}
		return df.format(txnTm);
	}

	public void setTxnTm(Date txnTm) {
		this.txnTm = txnTm;
	}

	@ExcelResources(title = "金额(元)", order = 4)
	public String getTxnAmt() {
		return txnAmt;
	}

	public void setTxnAmt(String txnAmt) {
		this.txnAmt = txnAmt;
	}

	@ExcelResources(title = "支付方式", order = 5)
	public String getPayChlTyp() {
		return PayTypeEnum.NameOfKey(payChlTyp);
	}

	public void setPayChlTyp(String payChlTyp) {
		this.payChlTyp = payChlTyp;
	}

	public String getTradeType() {
		return tradeType;
	}

	public void setTradeType(String tradeType) {
		this.tradeType = tradeType;
	}

	@ExcelResources(title = "签单人", order = 6)
	public String getDealUser() {
		return dealUser;
	}

	public void setDealUser(String dealUser) {
		this.dealUser = dealUser;
	}

	@ExcelResources(title = "订单号", order = 7)
	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	@ExcelResources(title = "订单类型", order = 8)
	public String getOrderType() {
		return OrderTypeEnum.ValOfKey(orderType);
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	@ExcelResources(title = "提交时间", order = 9)
	public String getSubTm() {
		if (StringUtils.isEmpty(subTm)) {
			return null;
		}
		return df.format(subTm);
	}

	@ExcelResources(title = "扎帐状态", order = 10)
	public String getIsLashName() {
		return LashStatusEnum.ValOfKey(isLash);
	}

	public void setIsLashName(String isLashName) {
		this.isLashName = isLashName;
	}

	public void setSubTm(Date subTm) {
		this.subTm = subTm;
	}

	public String getReceiptNumber() {
		return receiptNumber;
	}

	public void setReceiptNumber(String receiptNumber) {
		this.receiptNumber = receiptNumber;
	}

	public String getIsLash() {
		return isLash;
	}

	public void setIsLash(String isLash) {
		this.isLash = isLash;
	}

}
